<!-- 导航URL -->
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-md-12">
        <ol class="breadcrumb">
            <li><a href="index.html">主页</a></li>
            <li>超级银行家-红包</li>
            <li class="active"><strong>红包业务组织管理</strong></li>
        </ol>
    </div>
</div>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-controller="redOrgCtrl">
    <form class="form-horizontal" id="form1">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel-body ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>红包业务组织管理</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">业务类型：</label>
                            <div class="col-sm-2 checkbox" ng-bind="baseInfo.busType | formatDropping:redBusTypeList">
                            </div>
                            <label class="col-sm-2 control-label">组织名称：</label>
                            <div class="col-sm-2">
                                <select chosen="{width:'100%'}" id="autocomplete-select2" class="chosen-select" tabindex="5" ng-model="baseInfo.orgId" ng-options="x.orgId as x.orgName for x in orgInfoList">
                                    <option value=""></option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group" style="margin-top: 30px">
                            <label class="col-sm-2 control-label"></label>
                            <div class="col-sm-8">
                                <button class="btn btn-primary6 btn-mr20"  ng-click="query()" ng-disabled="submitting">查询</button>
                                <!--<button class="btn btn-primary3 btn-mr20" type="button" ng-click="resetForm()">清空</button>-->
                                <button class="btn btn-primary5 btn-mr20" type="button" ng-click="addModal()"
                                        ng-show="hasPermit('red.addRedOrg')">新增</button>
                                <button class="btn btn-primary5 btn-mr20" type="button" ng-click="addBatchModal()"
                                        ng-show="hasPermit('red.addRedOrg')">批量添加</button>
                                <button class="btn btn-primary10 btn-mr20" type="button" ng-click="deleteBatch()"
                                        ng-show="hasPermit('red.deleteRedOrg')">批量删除</button>
                                <a class="btn btn-primary4 btn-mr20" type="button" ui-sref="red.redControl"
                                        >返回</a>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="panel-body ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>红包业务组织列表</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="tposition">
                            <div class="gridStyle" ui-grid="grid" ui-grid-selection ui-grid-pagination
                                 ui-grid-resize-columns ui-grid-pinning></div>
                            <div ng-show="loadImg" class="timg"></div>
                        </div>
                    </div>
                </div>
                <div style="height:30px;"></div>
            </div>
        </div>
    </form>

    <div id="importModal" class="modal fade form-horizontal" tabindex="3" role="dialog">
        <div class="modal-dialog" style="height:300px;width: 700px">
            <div class="modal-content" style="height:300px;width: 700px">
                <form class="form-horizontal" name="horizontalAcc">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            &times;</button>
                        <h3 class="modal-title">批量导入</h3>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">导入文件：</label>
                            <div class="col-sm-4" style="padding-top: 4px">
                                <input type="file" nv-file-select="" ng-model="fileSelect" uploader="uploader" multiple/>
                                <table class="table">
                                    <tbody>
                                    <tr ng-repeat="item in uploader.queue">
                                        <td>
                                            <strong>{{ item.file.name }}</strong>
                                        </td>
                                        <td nowrap>
                                            <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                                                <span class="glyphicon glyphicon-trash"></span>删除
                                            </button>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                            <label class="col-sm-1" ></label>
                            <div class="col-sm-3 checkbox">
                                <a href="red/redOrgTemplate" >导入模板</a>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <div class="form-group control-label">
                            <label class="col-sm-2 control-label"></label>
                            <div class="col-sm-6">
                                <button class="btn btn-primary btn-mr20" type="button" ng-click='importInfo()'
                                        ng-disabled="uploader.queue.length == 0 || importStatus"
                                >确定</button>
                                <button class="btn btn-primary4" type="button" ng-click='cancel()'
                                >返回</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div id="addModal" class="modal fade form-horizontal" tabindex="4" role="dialog">
        <div class="modal-dialog" style="height:300px;width: 700px">
            <div class="modal-content" style="height:300px;width: 700px">
                <form class="form-horizontal" name="horizontalAdd">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            &times;</button>
                        <h3 class="modal-title">新增</h3>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">组织名称：</label>
                            <div class="col-sm-4">
                                <select chosen="{width:'100%'}" id="autocomplete-select3" class="chosen-select" tabindex="5" ng-model="addInfo.orgId" ng-options="x.orgId as x.orgName for x in orgInfoList">
                                    <option value=""></option>
                                </select>
                            </div>
                        </div>
                        <div class="modal-footer" style="margin-top: 30px">
                            <div class="form-group control-label">
                                <label class="col-sm-2 control-label"></label>
                                <div class="col-sm-6">
                                    <button class="btn btn-primary btn-mr20" type="button" ng-click='addRedOrg()'
                                        ng-disabled="addInfo.orgId==-1">确定</button>
                                    <button class="btn btn-primary4" type="button" ng-click='cancel()'
                                    >返回</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

</div>
